package com.ibeeking.found.cop.b.rest.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ibeeking.found.cop.service.common.param.CopAttachementParam;
import com.ibeeking.found.cop.service.common.param.UniAttachParam;
import com.ibeeking.found.cop.service.common.query.CopAttachementQuery;
import com.ibeeking.found.cop.service.common.vo.CopAttachementVO;
import com.ibeeking.found.cop.service.common.vo.UniAttachVO;
import me.chanjar.weixin.cp.bean.external.msg.Attachment;

import java.util.List;

public interface ICopAttachementService {

    /***
     * 查询列表
     */
    List<CopAttachementVO> list(CopAttachementQuery query);

    /***
     * 查询列表
     */
    CopAttachementVO queryByMessageId(Long messageId);

    /***
     * 新增
     */
    Boolean add(CopAttachementParam param);

    /***
     * 新增
     */
    Boolean batchAdd(List<CopAttachementParam> params);

    /***
     * 修改
     */
    Boolean modify(CopAttachementParam param);

    /***
     * 通过id查询
     */
    CopAttachementVO queryById(Long id);

    /***
     * 通过id删除
     */
    Boolean del(Long id);

    /***
     * 通过messageId删除
     */
    Boolean delByMessageId(Long messageId);
    /***
     * 消息对象转换
     */
    CopAttachementParam transerUniAttachementToCopAttachement(List<UniAttachParam> attachementParamS);
    /***
     * 消息对象转换
     */
    List<UniAttachVO> transerCopAttachementToUniAttachement(CopAttachementVO attachementVO);

    /***
     * 把消息下的附件同步到企微上
     */
    List<Attachment> transerCopAttachementToWxcpAttachement(List<CopAttachementVO> attachementVOS);

    /***
     * 把消息下的附件同步到企微上
     */
    Boolean syncMessageAttachementsToWxCp(Long messageId);
}
